<template>
  <div class="topside">
    <div class="left">
      <span @click="home">商场首页</span>
      <span>欢迎来到零食商场</span>
      <span>请登录</span>
      <span>免费注册</span>
    </div>
    <div class="right">
      <span @click="shopping">购物车</span>
      <span>收藏夹</span>
      <span>手机版</span>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {}
  },
  methods: {
    shopping() {
      this.$router.push({
        path: '/shopping'
      })
    },
    home() {
      this.$router.push({
        path: '/home'
      })
    }
  }
}
</script>

<style lang="less" scoped>
.topside {
  width: 100%;
  height: @topside;
  padding: 0px calc((100vw - 1200px) / 2);
  display: flex;
  justify-content: space-between;
  background-color: rgb(197, 190, 190);

  .left {
    width: 40%;
    height: @topside;
    line-height: @topside;
    span {
      margin: 0 10px;
      cursor: pointer;
    }
  }
  .right {
    height: @topside;
    line-height: @topside;
    // width: 60%;
    span {
      margin: 0 10px;
      cursor: pointer;
    }
  }
}
</style>